projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64ed69c
)
menusectionbox: Avoid a critical warning
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 2 Aug 2020 02:03:06 +0000
(22:03 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 2 Aug 2020 02:03:41 +0000
(22:03 -0400)
The popover may already be gone when the item
is activated. Don't trigger a critical in that
case.
Related: #2986
gtk/gtkmenusectionbox.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmenusectionbox.c
b/gtk/gtkmenusectionbox.c
index bdcab6c80c1e5236995b1f4b88203ae531db3ad1..916ef54c47833ee5d319a70ae346dd7024e484bb 100644
(file)
--- a/
gtk/gtkmenusectionbox.c
+++ b/
gtk/gtkmenusectionbox.c
@@
-189,8
+189,9
@@
gtk_popover_item_activate (GtkWidget *button,
/* Activating the item could cause the popover
* to be free'd, for example if it is a Quit item
*/
- popover = g_object_ref (gtk_widget_get_ancestor (button,
- GTK_TYPE_POPOVER));
+ popover = gtk_widget_get_ancestor (button, GTK_TYPE_POPOVER);
+ if (popover)
+ g_object_ref (popover);
}
gtk_menu_tracker_item_activated (item);